package com.glsc.ngateway.common.xir.repo;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import com.glsc.ngateway.common.xir.domain.TtrdOtcPledgebond;

/**
 * @author houzhc
 * @description: TODO hzc
 * @date 2024年07月18日
 */
public interface TtrdOtcPledgebondRepository extends JpaRepository<TtrdOtcPledgebond, String>, JpaSpecificationExecutor<TtrdOtcPledgebond> {

    @Query(value = "select * from XIR_TRD.TTRD_OTC_PLEDGEBOND where 1=1 " +
            "and (coalesce(:codeList, null) is null or I_CODE  in (:codeList)) " +
            "", nativeQuery = true)
    List<TtrdOtcPledgebond> findAllByiCodeIn(@Param("codeList") List<String> codeList);
}
